﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.Coolzon.Designer.Views
{
    public partial class EventProxy
    {
        #region ui event

        [Common.Subscribe]
        public void OnReceiveUISelectSolutionEvent(Event.UI.UISelectSolutionEvent @event)
        {
            DesignView.API_SetSolution(@event.Solution);
        }

        #region select part lib item

        [Common.Subscribe]
        public void OnReceiveUISelectPartLibItemEvent(Event.UI.UISelectPartLibItemEvent @event)
        {
            DesignView.API_DrawPart(@event.PartLibItem);
        }

        #endregion

        #region select object
        [Common.Subscribe]
        public void OnReceiveUISelectObjectEvent(Event.UI.UISelectObjectEvent @event)
        {
            if (@event.SelectedObjectType == Designtime.Metadata.MetadataUtil.Scene)
            {
                // 打开场景
                //DesignView.API_OpenScene((@event.SelectedObject as Designtime.Metadata.Scene).RT_Scene.Name);
            }
        }
        #endregion

        #endregion
    }
}
